
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gdata.tlslite.X509CertChain</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.tlslite.html"><font color="#ffffff">tlslite</font></a>.X509CertChain</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/lib/python2.6/dist-packages/gdata/tlslite/X509CertChain.py">/usr/local/lib/python2.6/dist-packages/gdata/tlslite/X509CertChain.py</a></font></td></tr></table>
    <p><tt>Class&nbsp;representing&nbsp;an&nbsp;X.509&nbsp;certificate&nbsp;chain.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="gdata.tlslite.utils.cryptomath.html">gdata.tlslite.utils.cryptomath</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="gdata.tlslite.X509CertChain.html#X509CertChain">X509CertChain</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="X509CertChain">class <strong>X509CertChain</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>This&nbsp;class&nbsp;represents&nbsp;a&nbsp;chain&nbsp;of&nbsp;X.509&nbsp;certificates.<br>
&nbsp;<br>
@type&nbsp;x509List:&nbsp;list<br>
@ivar&nbsp;x509List:&nbsp;A&nbsp;list&nbsp;of&nbsp;L{tlslite.X509.X509}&nbsp;instances,<br>
starting&nbsp;with&nbsp;the&nbsp;end-entity&nbsp;certificate&nbsp;and&nbsp;with&nbsp;every<br>
subsequent&nbsp;certificate&nbsp;certifying&nbsp;the&nbsp;previous.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="X509CertChain-__init__"><strong>__init__</strong></a>(self, x509List<font color="#909090">=None</font>)</dt><dd><tt>Create&nbsp;a&nbsp;new&nbsp;<a href="#X509CertChain">X509CertChain</a>.<br>
&nbsp;<br>
@type&nbsp;x509List:&nbsp;list<br>
@param&nbsp;x509List:&nbsp;A&nbsp;list&nbsp;of&nbsp;L{tlslite.X509.X509}&nbsp;instances,<br>
starting&nbsp;with&nbsp;the&nbsp;end-entity&nbsp;certificate&nbsp;and&nbsp;with&nbsp;every<br>
subsequent&nbsp;certificate&nbsp;certifying&nbsp;the&nbsp;previous.</tt></dd></dl>

<dl><dt><a name="X509CertChain-getCommonName"><strong>getCommonName</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;Subject's&nbsp;Common&nbsp;Name&nbsp;from&nbsp;the&nbsp;end-entity&nbsp;certificate.<br>
&nbsp;<br>
The&nbsp;cryptlib_py&nbsp;module&nbsp;must&nbsp;be&nbsp;installed&nbsp;in&nbsp;order&nbsp;to&nbsp;use&nbsp;this<br>
function.<br>
&nbsp;<br>
@rtype:&nbsp;str&nbsp;or&nbsp;None<br>
@return:&nbsp;The&nbsp;CN&nbsp;component&nbsp;of&nbsp;the&nbsp;certificate's&nbsp;subject&nbsp;DN,&nbsp;if<br>
present.</tt></dd></dl>

<dl><dt><a name="X509CertChain-getEndEntityPublicKey"><strong>getEndEntityPublicKey</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;public&nbsp;key&nbsp;from&nbsp;the&nbsp;end-entity&nbsp;certificate.<br>
&nbsp;<br>
@rtype:&nbsp;L{tlslite.utils.RSAKey.RSAKey}</tt></dd></dl>

<dl><dt><a name="X509CertChain-getFingerprint"><strong>getFingerprint</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;hex-encoded&nbsp;fingerprint&nbsp;of&nbsp;the&nbsp;end-entity&nbsp;certificate.<br>
&nbsp;<br>
@rtype:&nbsp;str<br>
@return:&nbsp;A&nbsp;hex-encoded&nbsp;fingerprint.</tt></dd></dl>

<dl><dt><a name="X509CertChain-getNumCerts"><strong>getNumCerts</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;number&nbsp;of&nbsp;certificates&nbsp;in&nbsp;this&nbsp;chain.<br>
&nbsp;<br>
@rtype:&nbsp;int</tt></dd></dl>

<dl><dt><a name="X509CertChain-validate"><strong>validate</strong></a>(self, x509TrustList)</dt><dd><tt>Check&nbsp;the&nbsp;validity&nbsp;of&nbsp;the&nbsp;certificate&nbsp;chain.<br>
&nbsp;<br>
This&nbsp;checks&nbsp;that&nbsp;every&nbsp;certificate&nbsp;in&nbsp;the&nbsp;chain&nbsp;validates&nbsp;with<br>
the&nbsp;subsequent&nbsp;one,&nbsp;until&nbsp;some&nbsp;certificate&nbsp;validates&nbsp;with&nbsp;(or<br>
is&nbsp;identical&nbsp;to)&nbsp;one&nbsp;of&nbsp;the&nbsp;passed-in&nbsp;root&nbsp;certificates.<br>
&nbsp;<br>
The&nbsp;cryptlib_py&nbsp;module&nbsp;must&nbsp;be&nbsp;installed&nbsp;in&nbsp;order&nbsp;to&nbsp;use&nbsp;this<br>
function.<br>
&nbsp;<br>
@type&nbsp;x509TrustList:&nbsp;list&nbsp;of&nbsp;L{tlslite.X509.X509}<br>
@param&nbsp;x509TrustList:&nbsp;A&nbsp;list&nbsp;of&nbsp;trusted&nbsp;root&nbsp;certificates.&nbsp;&nbsp;The<br>
certificate&nbsp;chain&nbsp;must&nbsp;extend&nbsp;to&nbsp;one&nbsp;of&nbsp;these&nbsp;certificates&nbsp;to<br>
be&nbsp;considered&nbsp;valid.</tt></dd></dl>

</td></tr></table></td></tr></table>
</body></html>